<template>
  <div class="detail">
    <h1>{{ list.name }}</h1>
    <div v-html="list.content" class="content"></div>
  </div>
</template>

<script>
import { get } from "../utils/request";
export default {
  name: "Detail",
  data() {
    return {
      list: {},
    };
  },
  async created() {
    const res = await get(`/api/v1/products/${this.$route.query.id}`);
    console.log(res);
    this.list = res;
  },
};
</script>

<style>
.detail img {
  width: 100%;
}
</style>
